<template>
  <view class="benefit-home">
    <!-- <u-toast ref="uToast"></u-toast>
    <u-no-network></u-no-network> -->
    <!-- 这里是状态栏 -->
    <!-- <view class="status_bar">
    </view> -->
    <view class="title"> 业绩总览 </view>
    <newMerchants ref="newMerchants"></newMerchants>
    <orderMoney></orderMoney>
  </view>
</template>

<script>
import newMerchants from './components/newMerchants.vue';
import orderMoney from './components/orderMoney.vue';
export default {
  components: {
    newMerchants,
    orderMoney,
  },
  data() {
    return {};
  },
  // 页面显示时触发
  onShow() {
    this.getDetail();
  },
  mounted() {
    this.getDetail();
  },
  methods: {
    // 获取业绩总览数据
    getDetail() {
      this.$zx.user_api.getBenefitDetailData().then((data) => {
        console.log('getBenefitDetailData----->36', data);
        this.$refs.newMerchants.getMerchants(data);
      });
    },
  },
};
</script>

<style scoped lang="scss">
.benefit-home {
  width: 100vw;
  height: 100vh;
  font-size: 32rpx;
  position: relative;
  // 计算状态栏的高度
  padding-top: var(--status-bar-height);
}
.title {
  height: 80rpx;
  line-height: 80rpx;
  text-align: center;
  font-weight: bold;
  background-color: white;
  margin-bottom: 20rpx;
  font-size: 36rpx;
}
</style>
